<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
<div id="app">
    <book-list :books="bookList">
        <template slot="book" slot-scope="props">
            <li>{{props.bookname}}</li>
        </template>
    </book-list>
</div>
<template id="bookComp">
    <div>
        <ul>
            <slot name="book" v-for="book in books" :bookname="book.name"></slot>
        </ul>
    </div>
</template>
<script>
    var vm=new Vue({
        el:"#app",
        data:{
            bookList:[
                {name:"《111》"},
                {name:"《222》"},
                {name:"《333》"}
            ]
        },
        components:{
            "book-list":{
                props:["books"],
                template:"#bookComp"
            }
        }
    })
</script>

</body>
</html>